//
//  Cell.swift
//  PeggyTest
//
//  Created by Peggy on 17/6/5.
//  Copyright © 2017年 Peggy. All rights reserved.
//

import UIKit

class Cell: UITableViewCell {
 
    @IBOutlet weak var name: UILabel!
    @IBOutlet weak var sex: UILabel!
    @IBOutlet weak var des: UIButton!
    private var tempModel:User? = User()

    var user:User{
        get{
            return  self.tempModel!
        }
        set(newValue){
            self.tempModel = newValue
            self.name.text = tempModel?.name
            self.sex.text = tempModel?.sex
            self.des.setTitle(tempModel?.des, for: UIControlState(rawValue: 0))
        
        }
    }
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
